<template>
	<Popconfirm
		:visible 	= 'visible'
		:title 		= "title"
		@confirm 	= 'onConfirm'
	/>
</template>

<script setup>
	import { Popconfirm } from 'ant-design-vue'
	/* --------------------------- props --------------------------- */
	defineProps({
		title 	: { type:String, default: '确认删除此数据？'}
	})
	
	ref:visible = true
	const emit = defineEmits(['ok', 'change'])
	
	const close = () => visible = true
	const open = () => visible = false
	
	const onConfirm = () => {
		emit('ok', close)
	}
	
	/* --------------------------- 通信 --------------------------- */
	defineExpose({
		close,
		open
	})
</script>
